import ElckerServiceApi from '~/utils/axios';

class CodeManagerService extends ElckerServiceApi {
  private urlComPath: string = '/elckerApi/codeService/';

  getCodeDatas(data: any) {
    return this.getRequest({
      url: this.urlComPath + 'getCodeDatas',
      params: data,
    });
  }
  getCodeData(data: any) {
    return this.getRequest({
      url: this.urlComPath + 'getCodeData',
      params: data,
    });
  }
}

// 单列模式返回对象
let CodeManagerApi;
export default (() => {
  if (CodeManagerApi) return CodeManagerApi;
  CodeManagerApi = new CodeManagerService();
  return CodeManagerApi;
})();
